using System;
using System.Windows.Forms;

using FreeFlow.Administration;

namespace FreeFlowAdministrator
{
	/// <summary>
	/// Summary description for VariableAdaptor.
	/// </summary>
	public class VariableAdaptor : Adaptor
	{
    private Column variable;
    public VariableAdaptor(Column variable)
		{
      this.variable = variable;
		}

    public override string Text
    {
      get
      {
        return variable.Name;
      }
    }

    public override Control GetRenderer()
    {
      VariableControl control = new VariableControl();
      control.LoadVariable(variable);
      control.ItemDeleted += new EventHandler(TriggerItemDeleted);
      return control;
    }

    public override int ImageIndex
    {
      get
      {
        return 26;
      }
    }

    public override object Object
    {
      get
      {
        return variable;
      }
    }
	}
}
